<?php

namespace app\index\controller;

use think\Controller;

class BaseController extends Controller
{
    // 验证是否登录
    public function _initialize()
    {
//        var_dump(session('admin'));
        if (session('admin') == null) {
            $this->error('请先登录!','index/index/index');
        }
    }

}